package com.akgroup.common.util;

import cn.hutool.core.util.IdUtil;

/**
 * @author 孤霜
 * @version 1.0
 */
public class SnowUtil {
    private static long dataCenterID = 1; //数据中心
    private static long workerId = 1;    // 机器标识

    public static long getSnowflakeNextId(){
        return IdUtil.getSnowflake(workerId,dataCenterID).nextId();
    }
    public static String getSnowflakeNextIdStr(){
        return IdUtil.getSnowflake(workerId,dataCenterID).nextIdStr();
    }
}
